<template>
  <div>
    <el-form ref="form" :model="form" :rules="rules" label-width="130px" label-position="left">
      <el-form-item label="提现金额：" prop="money">
        <el-input v-model="form.money" placeholder="请输入提现金额" type="number" style="width:260px" />
        元 
      </el-form-item>
      <el-form-item label="转账方式：" prop="way">
        <el-radio-group v-model="form.way">
          <el-radio :label="1">微信</el-radio>
          <el-radio :label="2">支付宝</el-radio>
        </el-radio-group>
      </el-form-item>
      <template v-if="form.way == 1">
        <el-form-item label="微信收款码：" prop="money">
          <img src="" alt="" class="qrcode">
        </el-form-item>
      </template>
      <template v-if="form.way == 2">
        <el-form-item label="支付宝实名认证：" prop="money">
          <el-input v-model="form.phone" placeholder="请输入支付宝实名认证" />
        </el-form-item>
        <el-form-item label="支付宝账号：" prop="account">
          <el-input v-model="form.account" placeholder="请输入支付宝账号" />
        </el-form-item>
      </template>
      <el-form-item label="联系电话：" prop="phone">
        <el-input v-model="form.phone" placeholder="请输入联系电话" />
      </el-form-item>
      <el-form-item label="提现原因：" prop="type">
        <el-select
          v-model="form.type"
          placeholder="请选择类型"
          clearable
          filterable
          style="width: 100%"
        >
          <el-option
            v-for="(item, index) in reasons"
            :key="index"
            :label="item.name"
            :value="item.id"
          >
          </el-option>
        </el-select>
      </el-form-item>
      <div class="f-14 mb_20" style="color:#868686">温馨提示：申请提现后金额会在5个工作日内转账，提现状态可在提现记录中查看。</div>
    </el-form>
    <div class="flexend">
      <el-button type="primary" @click="submitForm">确 定</el-button>
      <el-button @click="cancel">取 消</el-button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        configType:1,
        type:1,
        money:''
      },
      rules: {},
      reasons: [
        { id: 1, name: "活动结束了，进行提现" },
        { id: 2, name: "不准备使用互动平台了" },
        { id: 3, name: "资金变更使用" },
        { id: 4, name: "暂时不打算做活动了" },
        { id: 5, name: "其它" },
      ],
    };
  },
  methods: {
    submitForm() {
      this.$refs.form.validate((valid) => {
        if (!valid) return;
      });
    },

    cancel(){
        this.$emit('close')
    }
  },
};
</script>

<style lang="scss" scoped>
.qrcode{
  width: 110px;
  height: 110px;
}
</style>

